Skip to content

Conversation

@wswsmao
Copy link
Contributor

@wswsmao wswsmao commented Oct 29, 2025

The FUSE layer previously returned zeroed Statfs, causing df to show 0 and kubelet to warn InvalidDiskCapacity on the image filesystem.

0s (x255 over 45h)      Warning   InvalidDiskCapacity   Node/10.255.64.239                      invalid capacity 0 on image filesystem
0s (x256 over 45h)      Warning   InvalidDiskCapacity   Node/10.255.64.239                      invalid capacity 0 on image filesystem
0s (x257 over 45h)      Warning   InvalidDiskCapacity   Node/10.255.64.239                      invalid capacity 0 on image filesystem

we can get this log:

df -h /var/lib/containerd-stargz-grpc/snapshotter/snapshots/113/fs
Filesystem      Size  Used Avail Use% Mounted on
stargz             0     0     0    - /var/lib/containerd-stargz-grpc/snapshotter/snapshots/113/fs

This change plumbs a base path and fills Statfs from unix.Statfs, with a safe fallback to zeros. A minimal test ensures zero when base is empty and non-zero when provided.

After this change:

df -h /var/lib/containerd-stargz-grpc/snapshotter/snapshots/1/fs
Filesystem      Size  Used Avail Use% Mounted on
stargz           99G   61G   34G  65% /var/lib/containerd-stargz-grpc/snapshotter/snapshots/1/fs

df -lh
...
stargz           99G   61G   34G  65% /var/lib/containerd-stargz-grpc/snapshotter/snapshots/1/fs
stargz           99G   61G   34G  65% /var/lib/containerd-stargz-grpc/snapshotter/snapshots/2/fs

@wswsmao
Copy link
Contributor Author

wswsmao commented Nov 10, 2025

@ktock

docs/overview.md Outdated

The config file can be passed to stargz snapshotter using `containerd-stargz-grpc`'s `--config` option.

## Configuration hot reload
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you separate the commit(or PR) if it contains both of the statfs fix and the config reaload?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@ktock
Copy link
Member

ktock commented Dec 1, 2025

invalid capacity 0 on image filesystem

I thought it was related to the wrong proxy_plugins.stargz.exports.root configuration for the CRI plugin (related PR: #1893, related issue: #1349 (comment) ). Can't this be solve just by setting proxy_plugins.stargz.exports.root to "/var/lib/containerd-stargz-grpc/" in containerd TOML file, or is it still an issue even with that configuration?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants